package com.hanson.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hanson.common.bean.SearchBean;
import com.hanson.entity.GoodsBean;
import com.hanson.entity.GoodsTypeMappingBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GoodsBeanMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(GoodsBean record);

    GoodsBean selectByPrimaryKey(Integer id);

    List<GoodsBean> selectAll();

    int updateByPrimaryKey(GoodsBean record);

    int updateSortById(@Param("sort") int sort, @Param("id") int id);

    int updateIsShowById(@Param("isShow") int isShow, @Param("id") int id);

    List<GoodsBean> listGoods(Page<GoodsBean> page, @Param("goodsBean") GoodsBean goodsBean);

    List<GoodsBean> listSimpleGoods(Page<GoodsBean> page, @Param("searchBean") SearchBean searchBean);

    List<GoodsBean> listSimpleGoodsByIds(@Param("list") List<GoodsTypeMappingBean> list);
    
    List<GoodsBean> listRecommendGoods();

    int countAlarmGoods();
}